#ifndef PYOCDWORKER_H
#define PYOCDWORKER_H

#include <QObject>

#include <QThread>
#include <qprocess.h>
#include <QDebug>

class pyocdWorker : public QObject
{
    Q_OBJECT
public:
    explicit pyocdWorker(QObject *parent = nullptr);

    quint8 lcdColorData[1920*1920 * 4];

    bool pyocdSendCmd(QString _target,QString _pack,QString _cmd);
    void pyocdScreenshot(QStringList _arguments);
    void pyocdExecute(QStringList _arguments);
private slots:
    void pyocdReadLog(void);
    void pyocdReadErrorLog(void);
    void pyocdFinishLog(int avgc);
signals:
    void processError(int _errorCode);
    void processInfo(QStringList _info);
    void processFinish(QByteArray _arguments);

private:
    QProcess    pyOCDProcess,openOCDProcess;
    QByteArray  processLog,openOCDLog;
    QString     target ,pack ;


};

#endif // PYOCDWORKER_H
